#!/bin/bash
#
# a simple webserver for viewing the clarity-demo locally. 
#
# usage:
#   demo-server <port-number>

# run from the root dir of the clarity-demo.

cd `dirname $0`/..

# use default port if called without args
PORT=2600 
if [[ $1 =~ ^[0-9]+$ ]]
  then PORT=$1
fi

echo "Starting local http server (ctrl-c to exit)"
echo ""
echo "  Clarity - Data Visualization: http://127.0.0.1:$PORT/clarity-demo/"
echo ""
python -m SimpleHTTPServer $PORT
